package com.green.model.manage;

import java.text.SimpleDateFormat;

import com.green.model.ExtraEntity;
import com.green.model.manage.enums.OperateLogTypeEnum;
import com.green.model.uitl.DateUtils;

/**
 * 操作日志
 * 
 * @author gogole
 */
public class OperateLog extends ExtraEntity<String> {

    private static final long serialVersionUID = -7755163721526526238L;

    private OperateLogTypeEnum operateLogType; // 操作模块
    private String content; // 操作内容
    private String reason;// 原因
    private String ip; // ip
    private String personName; // 操作人名称
    private String logTypeId;// 操作模块ID
    @SuppressWarnings("unused")
	private String createTimes;// 操作日期格式化
    
    
    public String getCreateTimes() {
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 保存费用明细
		
		return sf.format(getCreateTime());
	}

	public void setCreateTimes(String createTimes) {
		this.createTimes = createTimes;
	}

	public String getLogTypeId() {
        return logTypeId;
    }

    public void setLogTypeId(String logTypeId) {
        this.logTypeId = logTypeId;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public OperateLogTypeEnum getOperateLogType() {
        return operateLogType;
    }

    public void setOperateLogType(OperateLogTypeEnum operateLogType) {
        this.operateLogType = operateLogType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public String getCreateTimeStr(){
        return DateUtils.format(super.getCreateTime());
    }
    
    public String getOperateLogTypeStr(){
        return operateLogType!=null?operateLogType.getName():"";
    }
}
